package com.innerclass;

public class InnerClassExercise01 {
    public static void main(String[] args) {

        //当作实参直接传递，简洁高效
        f1(new IL() {

            @Override
            public void show() {
                System.out.println("这是一名画");
            }
        });

        f1(new Picture());

    }

    //形参是接口类型
    public static void f1(IL il) {
        il.show();
    }

}

interface IL {
    void show();
}

//类->实现 => 硬编码
class Picture implements IL {

    @Override
    public void show() {
        System.out.println("画展示");
    }
}